package com.slz3.business.module.memberManagement.userScoreRecord.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.memberManagement.userScoreRecord.domain.UserScoreRecord;
import com.slz3.business.module.memberManagement.userScoreRecord.domain.UserScoreRecordCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class UserScoreRecordResAtomic extends UserScoreRecordResExecutor {

    public Mono<ServerResponse> add_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecord userScoreRecord) {
        return UserScoreRecordResSafeValid.add(req, userScoreRecord) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, userScoreRecord);
    }

    public Mono<ServerResponse> delete_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecordCondition userScoreRecordCondition) {
        return UserScoreRecordResSafeValid.delete(req, userScoreRecordCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecord userScoreRecord) {
        return UserScoreRecordResSafeValid.modify(req, userScoreRecord) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, userScoreRecord);
    }

    public Mono<ServerResponse> info_$UserScoreRecordUpdateLock(ServerRequest req) {
        return UserScoreRecordResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecordCondition userScoreRecordCondition) {
        return UserScoreRecordResSafeValid.auditSubmit(req, userScoreRecordCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecordCondition userScoreRecordCondition) {
        return UserScoreRecordResSafeValid.audit(req, userScoreRecordCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecordCondition userScoreRecordCondition) {
        return UserScoreRecordResSafeValid.auditReject(req, userScoreRecordCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecordCondition userScoreRecordCondition) {
        return UserScoreRecordResSafeValid.usingEnable(req, userScoreRecordCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$UserScoreRecordUpdateLock(ServerRequest req, UserScoreRecordCondition userScoreRecordCondition) {
        return UserScoreRecordResSafeValid.usingDisable(req, userScoreRecordCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
